<?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
include("../include/function.php");
dbconnect();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
$id=$_GET['id'];

$del = deletequery("adminform","adminid",$id);


/* $delete = "DELETE FROM adminform WHERE adminid='$id'";
$de = mysql_query($delete); */

$del = deletequery("userrole","adminid",$id);
/* $delete1 = "DELETE FROM userrole WHERE adminid='$id'";
$de1 = mysql_query($delete1); */
header("Location: user_list.php");
//print_r($delete);
}
else
{
header("Location: login.php");
}
?>

